#include "StdAfx.h"
#include "InpDomain.h"

inpTeeSplitUnit::SplitJoinUnitType inpTeeSplitUnit::GetSplitJoinUnitType() const
{
	int iCount = m_RefTeeSplitUnit.GetCount();
	if ( iCount < 2 )
		return inpTeeSplitUnit::eErrorTeeType;



	for ( int i=0 ;i<iCount; i++ )
	{
		inpTeeSplitUnit *pinpTeeSplitUnit = NULL;
		m_RefTeeSplitUnit.GetAt( i,pinpTeeSplitUnit );
		if ( this->GetEndPt().isEqualTo( pinpTeeSplitUnit->GetEndPt(),g_Tol ))
			return inpTeeSplitUnit::eJoinTee;
	}
	return inpTeeSplitUnit::eSplitTee;
}